﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Client.XML
{
    [XmlRoot("Plans")]
    public class PlanList
    {
        public PlanList()
        {
            Plans = new List<DayPlan>();
        }

        [XmlElement("Plan")]
        public List<DayPlan> Plans { get; set; }
    }

    public class DayPlan
    {
        public DayPlan()
        {
            PlanItems = new List<PlanItem>();
        }

        [XmlAttribute("ID")]
        public string ID { get; set; }

        [XmlAttribute("Date")]
        public string Date { get; set; }

        [XmlElement("PlanItem")]
        public List<PlanItem> PlanItems { get; set; }
    }

    public class PlanItem
    {
        [XmlAttribute("StartTime")]
        public string StartTime { get; set; }

        [XmlAttribute("EndTime")]
        public string EndTime { get; set; }

        [XmlAttribute("AllowUsePC")]
        public string AllowUsePC { get; set; }

        [XmlAttribute("CreateOn")]
        public string CreateOn { get; set; }

        [XmlAttribute("UpdateOn")]
        public string UpdateOn { get; set; }

        [XmlElement("Context")]
        public string Context { get; set; }
    }
}
